/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package upc.jfactory.scp.jpa.bean;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Diego
 */
@Entity
@Table(name = "Postulante", catalog = "DAEPIFS_DB", schema = "dbo")
@NamedQueries({
    @NamedQuery(name = "Postulante.findAll", query = "SELECT p FROM Postulante p"),
    @NamedQuery(name = "Postulante.findByPostulanteId", query = "SELECT p FROM Postulante p WHERE p.postulanteId = :postulanteId"),
    @NamedQuery(name = "Postulante.findByRutaCV", query = "SELECT p FROM Postulante p WHERE p.rutaCV = :rutaCV"),
    @NamedQuery(name = "Postulante.findByAnalista", query = "SELECT p FROM Postulante p WHERE p.analista = :analista"),
    @NamedQuery(name = "Postulante.findByTester", query = "SELECT p FROM Postulante p WHERE p.tester = :tester"),
    @NamedQuery(name = "Postulante.findByDesarrollador", query = "SELECT p FROM Postulante p WHERE p.desarrollador = :desarrollador"),
    @NamedQuery(name = "Postulante.findByCodigo", query = "SELECT p FROM Postulante p WHERE p.codigo = :codigo")})
public class Postulante implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "postulante_id", nullable = false)
    private Integer postulanteId;
    @Column(name = "ruta_CV", length = 5000)
    private String rutaCV;
    @Basic(optional = false)
    @Column(name = "analista", nullable = false)
    private boolean analista;
    @Basic(optional = false)
    @Column(name = "tester", nullable = false)
    private boolean tester;
    @Basic(optional = false)
    @Column(name = "desarrollador", nullable = false)
    private boolean desarrollador;
    @Column(name = "codigo", length = 50)
    private String codigo;

    public Postulante() {
    }

    public Postulante(Integer postulanteId) {
        this.postulanteId = postulanteId;
    }

    public Postulante(Integer postulanteId, boolean analista, boolean tester, boolean desarrollador) {
        this.postulanteId = postulanteId;
        this.analista = analista;
        this.tester = tester;
        this.desarrollador = desarrollador;
    }

    public Integer getPostulanteId() {
        return postulanteId;
    }

    public void setPostulanteId(Integer postulanteId) {
        this.postulanteId = postulanteId;
    }

    public String getRutaCV() {
        return rutaCV;
    }

    public void setRutaCV(String rutaCV) {
        this.rutaCV = rutaCV;
    }

    public boolean getAnalista() {
        return analista;
    }

    public void setAnalista(boolean analista) {
        this.analista = analista;
    }

    public boolean getTester() {
        return tester;
    }

    public void setTester(boolean tester) {
        this.tester = tester;
    }

    public boolean getDesarrollador() {
        return desarrollador;
    }

    public void setDesarrollador(boolean desarrollador) {
        this.desarrollador = desarrollador;
    }

    public String getCodigo() {
        return codigo;
    }

    public void setCodigo(String codigo) {
        this.codigo = codigo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (postulanteId != null ? postulanteId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Postulante)) {
            return false;
        }
        Postulante other = (Postulante) object;
        if ((this.postulanteId == null && other.postulanteId != null) || (this.postulanteId != null && !this.postulanteId.equals(other.postulanteId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "upc.jfactory.scp.jpa.bean.Postulante[postulanteId=" + postulanteId + "]";
    }

}
